import { request } from '../utils/index.js';

// 已入库蛋糕列表查询(未中转前入库)
export function getWarehouseProductList (params) {
  return request({
    url: '/transfer/getWarehouseProductList',
    method: 'GET',
    data: {
      ...params
    },
  })
}

// 统计
export function getOrderStatistics (params) {
  return request({
    url: '/transfer/getOrderStatistics',
    method: 'GET',
    data: {
      ...params
    },
  })
}

// 出库
export function outbound (params) {
  return request({
    url: '/transfer/outbound',
    method: 'POST',
    data: {
      ...params
    },
  })
}

// 出发
export function sally (params) {
  return request({
    url: '/transfer/sally',
    method: 'POST',
    data: {
      ...params
    },
  })
}

// 送达
export function finish (params) {
  return request({
    url: '/transfer/finish',
    method: 'POST',
    data: {
      ...params
    },
  })
}

// 提交中转异常工单
export function submitUnusual (params) {
  return request({
    url: '/transfer/submitUnusual',
    method: 'POST',
    data: {
      ...params
    },
  })
}

// 中转记录查询
export function getTransferNoteList (params) {
  return request({
    url: '/transfer/getTransferNoteList',
    method: 'GET',
    data: {
      ...params
    },
  })
}

// 异常记录查询
export function listUnusuals (params) {
  return request({
    url: '/transfer/listUnusuals',
    method: 'GET',
    data: {
      ...params
    },
  })
}

// 移除扫码入库
export function removeOutbound (data) {
  return request({
    url: '/transfer/removeOutbound',
    method: 'POST',
    data,
  })
}

// 通过提取码获取订单信息
export function getExtractCode (params) {
  return request({
    url: '/transfer/getExtractCode',
    method: 'get',
    data: params
  })
}

// 通过提取码获取订单信息
export function getPartsList (params) {
  return request({
    url: '/transfer/getPartsList',
    method: 'get',
    data: params
  })
}

// 配件中转处理
export function disposeParts(data) {
  return request({
    url: '/transfer/disposeParts',
    method: 'post',
    data
  })
}

// 配件中转(未处理统计)
export function getUnDisposePartsCount(params) {
  return request({
    url: '/transfer/getUnDisposePartsCount',
    method: 'get',
    data: params
  })
}